home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / CLASSSRC.PAK / WSYSCLSS.CPP < prev   
C/C++ Source or Header  |  1997-05-06  |  880b  |  41 lines

  1. //----------------------------------------------------------------------------
  2. // Borland WinSys Library
  3. // Copyright (c) 1993, 1997 by Borland International, All Rights Reserved
  4. //
  5. //$Revision:   5.6  $
  6. //
  7. // Implementation of streaming for window system structure and type
  8. // encapsulation
  9. //----------------------------------------------------------------------------
  10. #include <winsys/pch.h>
  11. #include <winsys/wsyscls.h>
  12.  
  13. #if defined(BI_NAMESPACE)
  14. namespace ClassLib {
  15. #endif
  16.  
  17. //
  18. // Streaming operators for resource Ids
  19. //
  20. ostream& _WSYSFUNC
  21. operator <<(ostream& os, const TResId& id)
  22. {
  23.   bool  isNumeric = ToBool(!id.IsString());
  24.  
  25.   if (isNumeric)
  26.     os << id.Num;
  27.  
  28.   else
  29. #if defined(BI_DATA_NEAR)
  30.     os << string(id.Str);
  31. #else
  32.     os << id.Str;
  33. #endif
  34.   return os;
  35. }
  36.  
  37. #if defined(BI_NAMESPACE)
  38. }       // namespace ClassLib
  39. #endif
  40.  
  41.